home *** CD-ROM | disk | FTP | other *** search
/ Pascal Super Library / Pascal Super Library (CW International)(1997).bin / LIBRARY / TOOLPAS2 / DUMPIX.PAS < prev    next >
Pascal/Delphi Source File  |  1990-05-17  |  546b  |  32 lines

  1.  
  2. {$m 10000,0,0}
  3.  
  4. uses mdosio,bindex;
  5.  
  6. var
  7.    ix:   bindex_handle;
  8.  
  9. begin
  10.    if paramcount <> 1 then
  11.    begin
  12.       writeln('usage:  dumpix INDEXFILE');
  13.       writeln('example: dumpix NAMES.IX');
  14.       halt(1);
  15.    end;
  16.  
  17.    OpenIndex(ix,paramstr(1));
  18.  
  19.    ix.match := #0;
  20.    FindKey(ix);
  21.    while ix.ixpos <> indexNotFound do
  22.    begin
  23.       writeln(ix.rec.key,'':ix.hdr.recsize-length(ix.rec.key),' ',
  24.               ix.rec.fid:8,' ',
  25.               ix.rec.fpos:8);
  26.       FindNext(ix);
  27.    end;
  28.  
  29.    CloseIndex(ix);
  30. end.
  31.  
  32.